home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 1997
/
MacHack 1997.toast
/
Hacks
/
Hacks ’96
/
Sharks' Spark Hack
/
SparksApp.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1996-06-21
|
957b
|
49 lines
#ifndef SPARKS_WINDOW_H
#include "SparksWindow.h"
#endif
#ifndef DESKTOP_VIEW_H
#include "DesktopView.h"
#endif
#ifndef SPARKSAPP_H
#include "SparksApp.h"
#endif
#pragma mark ## MAIN
main()
{
SparksApplication *myApplication;
myApplication = new SparksApplication();
myApplication->Run();
delete(myApplication);
return(0);
}
#pragma mark ## APPLICATION
SparksApplication::SparksApplication()
: BApplication('HLWD')
{
SparksWindow *aWindow;
DesktopView *aView;
BRect aRect;
screen_info ScreenInfo;
// set up a rectangle and instantiate a new window
get_screen_info( &ScreenInfo );
aWindow = new SparksWindow(ScreenInfo.frame);
// set up a rectangle and instantiate a new view
// view rect should be same size as window rect but with left top at (0, 0)
aView = new DesktopView(ScreenInfo.frame, "DesktopView");
// add view to window
aWindow->AddChild(aView);
// make window visible
aWindow->Show();
}